package ae.pcfc.cldos.online.common.facade.provider;

import ae.pcfc.cldos.online.common.facade.BaseFacade;
import ae.pcfc.cldos.online.common.facade.EncryptionFacade;
import ae.pcfc.cldos.online.common.manager.EncryptionManager;

/**
 * 
 * @author arosa
 *
 */
public class EncryptionFacadeImpl extends BaseFacade implements EncryptionFacade {

	private EncryptionManager encryptionManager;
	
	public void setEncryptionManager(EncryptionManager encryptionManager) {
		this.encryptionManager = encryptionManager;
	}
	
	public String encryptAndEncode(String in){
		return encryptionManager.encryptAndEncode(in);
	}
	
	public String decodeAndDecrypt(String in){
		return encryptionManager.decodeAndDecrypt(in);
	}
	
	public String base64decode(String in){
		return encryptionManager.base64decode(in);
	}
	
	public byte[] base64decodeToByteArray(String in){
		return encryptionManager.base64decodeToByteArray(in);
	}
	
	public String base64encodeToString(byte[] in){
		return encryptionManager.base64encodeToString(in);
	}
}
